﻿@inherits BaseComponent

<Tabs Animated Class="@Model.Class" OnChange="OnTabChanged">
    <TabBarExtraContentLeft>
        @Model.Left
    </TabBarExtraContentLeft>
    <ChildContent>
        @if (Model != null && Model.HasItem)
        {
            foreach (var item in Model.Items)
            {
                if (!item.IsVisible)
                    continue;

                if (item.Content != null)
                {
                    <TabPane Key="@item.Id" Tab="@Language?.GetTitle(item.Title)">
                        @item.Content
                    </TabPane>
                }
                else
                {
                    <TabPane Key="@item.Id" Tab="@Language?.GetTitle(item.Title)" />
                }
            }
        }
    </ChildContent>
    <TabBarExtraContentRight>
        @Model.Right
    </TabBarExtraContentRight>
</Tabs>